﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace MyDHServer.Contorls
{
    /// <summary>
    /// 菜单项类，经类通过序列化在XML文件中保存
    /// </summary>
    [Serializable]
    public class MenuItem
    {
        [XmlAttribute("text")]
        public string Text { get; set; }
        [XmlAttribute("name")]
        public string Name { get; set; }
        [XmlAttribute("href")]
        public string Href { get; set; }
        [XmlAttribute("roles")]
        public string Roles { get; set; }
        [XmlAttribute("enable")]
        public bool Enable { get; set; }
    }

    /// <summary>
    /// 菜单项集合
    /// </summary>
    [Serializable]
    public class MenuItemCollection
    {
        [XmlArray("MenuItems")]
        public MenuItem[] MenuItems { get; set; }
    }
}
